package com.ruoyi.project.jiaqin.downmeasure.service.impl;

import java.util.List;
import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.jiaqin.downmeasure.mapper.DownMeasureMapper;
import com.ruoyi.project.jiaqin.downmeasure.domain.DownMeasure;
import com.ruoyi.project.jiaqin.downmeasure.service.IDownMeasureService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 羽绒含绒量Service业务层处理
 *
 * @author admin
 * @date 2021-01-29
 */
@Service
public class DownMeasureServiceImpl implements IDownMeasureService
{
    @Autowired
    private DownMeasureMapper downMeasureMapper;

    /**
     * 查询羽绒含绒量
     *
     * @param id 羽绒含绒量ID
     * @return 羽绒含绒量
     */
    @Override
    public DownMeasure selectDownMeasureById(String id)
    {
        return downMeasureMapper.selectDownMeasureById(id);
    }

    /**
     * 查询羽绒含绒量列表
     *
     * @param downMeasure 羽绒含绒量
     * @return 羽绒含绒量
     */
    @Override
    public List<DownMeasure> selectDownMeasureList(DownMeasure downMeasure)
    {
        return downMeasureMapper.selectDownMeasureList(downMeasure);
    }

    /**
     * 新增羽绒含绒量
     *
     * @param downMeasure 羽绒含绒量
     * @return 结果
     */
    @Override
    public int insertDownMeasure(DownMeasure downMeasure)
    {
        downMeasure.setId(UUID.randomUUID().toString().replace("-",""));
        return downMeasureMapper.insertDownMeasure(downMeasure);
    }

    /**
     * 修改羽绒含绒量
     *
     * @param downMeasure 羽绒含绒量
     * @return 结果
     */
    @Override
    public int updateDownMeasure(DownMeasure downMeasure)
    {
        return downMeasureMapper.updateDownMeasure(downMeasure);
    }

    /**
     * 删除羽绒含绒量对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteDownMeasureByIds(String ids)
    {
        return downMeasureMapper.deleteDownMeasureByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除羽绒含绒量信息
     *
     * @param id 羽绒含绒量ID
     * @return 结果
     */
    @Override
    public int deleteDownMeasureById(String id)
    {
        return downMeasureMapper.deleteDownMeasureById(id);
    }
}
